#! /bin/sh
# A caching version of os-prober.
set -e

if [ -z "$WINOSDATA" ]; then
	cache=/var/lib/lingmo-installer/os-prober-cache
else
	cache=/var/lib/lingmo-installer/os-prober-cache-data
fi
if [ ! -e "$cache" ]; then
	mkdir -p "${cache%/*}"
	PATH=/usr/sbin:/sbin:/usr/bin:/bin os-prober >"$cache"
fi
cat "$cache"

exit 0
